<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/common/common.jspf"%>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/warehouse/monthreckon_form_edit.js"></script>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}

label[class^="btn btn-default"] {
	margin-top: -4px;
}
</style>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/monthreckon_form/monthreckon_form_editEntity.shtml">
		<input type="hidden" class="form-control checkacc"
			value="${enter.id}" name="enterstorageFormMap.id" id="id">
		<section class="panel panel-default">
		<div class="panel-body">
			<div class="form-group">
				<label class="col-sm-3 control-label">物料编码</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${enter.material_code}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">客户编号</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${enter.cid}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">客户名称</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${enter.cname}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">单位</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${enter.unit}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">模具编码</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${enter.mold_code}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">包数</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${enter.packNum}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">每包件数</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${enter.orderPack}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">业务员</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${enter.username}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">最后进仓</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${enter.finalEnterDate}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">仓位</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" readonly
						value="${enter.warehouse}" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<!-- 开始月度盘点 -->
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="panel panel-default">
				<div class="panel-body">
					<table class="table table-bordered">
						<thead>
							<tr>
								<th style="text-align: center;width:176px;">实际包数</th>
								<th style="text-align: center;width:176px;">备注</th>
								<th style="text-align: center;width:176px;">填写时间</th>
								<th style="text-align: center;"><input type="button"
									class="btn btn-primary" onclick="insert_row(this)" value="增加"></th>
								<th style="text-align: center;"><input type="button"
									class="btn btn-danger" onclick="deleteRow(this)" value="删除"></th>
							</tr>
						</thead>
						<tbody id="tbl">
							<c:forEach var="r" items="${reckon }">
								<tr>
									<td>
										<div class="input-group">
											<input type="text" class="form-control" readonly
												name="count_1" value="${r.count}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="text" class="form-control" readonly
												name="remark_1" value="${r.remark}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="text" class="form-control" readonly style="width:210px;"
												name="time_1" value="${r.time}">
										</div>
									</td>
									
									<td><input type="button" class="btn btn-primary"
										onclick="insert_row(this)" value="增加"></td>
									<td><input type="button" class="btn btn-danger"
										onclick="deleteRow(this)" value="删除"></td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		<footer class="panel-footer text-right bg-light lter">
		<button type="submit" class="btn btn-success btn-s-xs">提交</button>
		</footer> </section>
	</form>
	<script type="text/javascript">
		var i = 0
		function insert_row(obj) {
			var today=new Date();
			var s=today.getFullYear()+"年"+(today.getMonth()+1)+"月"+today.getDate()+"日"+today.getHours()+"时"+today.getMinutes()+"分"+today.getSeconds()+"秒";
			i++;
			R = tbl.insertRow(tbl.rows.length);
			C = R.insertCell(0);
			C.innerHTML = '<div class="input-group"><input type="text" class="form-control" name="count_1"></div>';
			C = R.insertCell(1);
			C.innerHTML = '<div class="input-group"><input type="text" class="form-control" name="remark_1"></div>';
			C = R.insertCell(2);
			C.innerHTML = '<div class="input-group"><input type="text" class="form-control" name="time_1" readonly style="width:210px;" value='+s+'></div>';
			C = R.insertCell(3);
			C.innerHTML = '<input type="button" class="btn btn-primary" onclick ="insert_row(this)" value = "增加">';
			C = R.insertCell(4);
			C.innerHTML = '<input type="button" class="btn btn-danger" onclick ="deleteRow(this)" value ="删除">';
		}
		function deleteRow(obj) {
			var i = obj.parentNode.parentNode.rowIndex;
			if (i > 0) {
				tbl.deleteRow(i-1);
			}
		}
	</script>
</body>
</html>